![]() |
RestoreEntries |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Restores a selection of color table entries. This function is used by system software and your application should not need to call it.
void RestoreEntries ( CTabHandle srcTable, CTabHandle dstTable, ReqListRec *selection );
The color table containing entries to be restored.
The color table in which to restore the entries. If dstTable is NULL, or points to the current GDevice data structure’s color table, RestoreEntries changes the device’s color table and the hardware CLUT to these new colors.
A pointer to the ReqListRec data structure. The entries to be restored are enumerated as offsets into a ColorTable data structure, not the contents of the ColorSpec.value field.)
The RestoreEntries function does not rebuild the inverse table.
If a request is beyond the end of the destination color table, RestoreEntries sets that position in the requestList data structure to colReqErr, and returns an error. RestoreEntries assumes that the color table specified by the srcTable parameter and the request list specified by the selection parameter have the same number of entries.
RestoreEntries does not change the color table’s seed, so no invalidation occurs (which may cause RGBForeColor to act strangely). RestoreEntries ignores protection and reservation of color table entries.
You generally should use the Palette Manager to give your application its own set of colors; use of RestoreEntries should be limited to special-purpose applications. RestoreEntries allows you to change a color table without changing its ctSeed field. You can execute the application code and then use RestoreEntries to put the original colors back in. However, in some cases things in the background may appear in the wrong colors, since they were never redrawn. To avoid this, your application must build its own new inverse table and redraw the background. If you then use RestoreEntries, you should call the CTabChanged function to clean up correctly.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)